﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    // NOTE: If you change the interface name "IScience" here, you must also update the reference to "IScience" in App.config.
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IScience
    {
        [OperationContract]
        DataSet Science_GetAll();

        [OperationContract]
        ScienceInfo Science_GetInfo(int ScienceID);

        [OperationContract]
        DataSet Science_GetList(out int ItemCount, int currentPage, int pageSize, int branchID, int departmentID, int month, int year);

        [OperationContract]
        int Science_Insert(ScienceInfo eInfo);

        [OperationContract]
        bool Science_Update(ScienceInfo eInfo);

        [OperationContract]
        bool Science_Delete(int ScienceID);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class ScienceInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        int _BranchID;
        [DataMember]
        public int BranchID
        {
            get { return _BranchID; }
            set { _BranchID = value; }
        }

        int _DepartmentID;
        [DataMember]
        public int DepartmentID
        {
            get { return _DepartmentID; }
            set { _DepartmentID = value; }
        }

        int _EmployeeID;
        [DataMember]
        public int EmployeeID
        {
            get { return _EmployeeID; }
            set { _EmployeeID = value; }
        }

        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        string _Tenor;
        [DataMember]
        public string Tenor
        {
            get { return _Tenor; }
            set { _Tenor = value; }
        }

        string _Result;
        [DataMember]
        public string Result
        {
            get { return _Result; }
            set { _Result = value; }
        }

        DateTime _FromDate;
        [DataMember]
        public DateTime FromDate
        {
            get { return _FromDate; }
            set { _FromDate = value; }
        }

        DateTime _ToDate;
        [DataMember]
        public DateTime ToDate
        {
            get { return _ToDate; }
            set { _ToDate = value; }
        }

        string _TakePartAsName;
        [DataMember]
        public string TakePartAsName
        {
            get { return _TakePartAsName; }
            set { _TakePartAsName = value; }
        }

        string _ClassManagement;
        [DataMember]
        public string ClassManagement
        {
            get { return _ClassManagement; }
            set { _ClassManagement = value; }
        }

        string _ClassOwner;
        [DataMember]
        public string ClassOwner
        {
            get { return _ClassOwner; }
            set { _ClassOwner = value; }
        }

        DateTime _ResultDate;
        [DataMember]
        public DateTime ResultDate
        {
            get { return _ResultDate; }
            set { _ResultDate = value; }
        }
    }
}

